class Request < ActiveRecord::Base
  
  def self.request_count(id)
    friend_request = Request.find_by_sql("SELECT * FROM requests WHERE user_id='#{id}'")
    return friend_request.size
  end
  
  def self.request_list(id)
    friend_request = Request.find_by_sql("SELECT * FROM requests WHERE user_id='#{id}'")
  end
  
  def self.get_request_list(id)
    Follower.find_by_sql("SELECT * FROM requests WHERE requester_id='#{id}'")
  end
  
end
